package com.wayhome.srpingbootmybatis.mbs.util;

public enum TldyStepEnum {

    TLDY_STEP_MINUS_1("-1", "退回"),
    TLDY_STEP_0("0", "待申报"),
    TLDY_STEP_1("1", "初审"),
    TLDY_STEP_2("2", "复审"),
    TLDY_STEP_3("3", "结束"),
    ;

    private TldyStepEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private String code;
    private String msg;

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static String getMsgByCode(String code) {
        for (TldyStepEnum item : TldyStepEnum.values()) {
            if (item.code.equals(code)) {
                return item.msg;
            }
        }
        return null;
    }

    public static String getCodeByMsg(String msg) {
        for (TldyStepEnum item : TldyStepEnum.values()) {
            if (item.msg.equals(msg)) {
                return item.code;
            }
        }
        return null;
    }
}
